package com.douxg.fastCoding.web.consts;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @Description 模板功能点枚举
 * @Auther douxg
 * @Date 2020/7/30 10:16
 */
@Getter
public enum FunctionEnum {
    CODE("代码生成", Arrays.asList("mybatis", "mybatisPlus"));
    private String name;
    private List<String> groups;

    FunctionEnum(String name, List<String> groups) {
        this.name = name;
        this.groups = groups;
    }

    public static FunctionEnum getByName(String name) {
        for (FunctionEnum functionEnum : values()) {
            if (functionEnum.name.equals(name)) {
                return functionEnum;
            }
        }
        return null;
    }
}
